/*
 * File:    LocalProcedureStore.java
 * Created: 27-Feb-2009
 * Version: $Id$
 *
 * COPYRIGHT (C) 2009, Bitgate Mobile, LLC.  All Rights Reserved.
 *
 * software@bitgatemobile.com
 */

package com.webplasm.render.tags.u.procedure;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.webplasm.render.tags.WrappedNode;
import static com.bitgate.util.debug.Debug.debug;

public class LocalProcedureStore {
	
	private Map<String, ProcedureContainer> procedures;
	
	public LocalProcedureStore() {
		procedures = new HashMap<String, ProcedureContainer>();
	}
	
	public void addProcedure(String name, WrappedNode node, List<String> variables) {
		debug("Adding procedure '" + name + "' variables=" + variables);
		procedures.put(name, new ProcedureContainer(name, node, variables));
	}
	
	public ProcedureContainer getProcedure(String name) {
		return procedures.get(name);
	}
	
}